import { getChufangImg } from '@/services/consult'
import { showImagePreview } from 'vant'

export function usePrescription() {
  const previewPrescription = async (prescriptionId: string) => {
    // 获取到处方的图片
    const { data } = await getChufangImg(prescriptionId)
    // 然后利用预览图片组件渲染
    showImagePreview([data.url])
  }
  return { previewPrescription }
}
